package ec.atreasure.com.core.fragments.bottom;

import java.util.LinkedHashMap;
import java.util.Map;

/**
 * Description :fragment与底部item绑定
 * Created by wangjin on 2019/7/6.
 * Job number：
 * Phone ：18301070822
 * Email： 120182051@qq.com
 * Person in charge : 汪渝栋
 * Leader：
 */
public final class BottomItemBuilder {

    private final Map<BottomTabBean, BottomItemFragment> items = new LinkedHashMap<>();

    public static BottomItemBuilder builder() {
        return new BottomItemBuilder();
    }

    public final BottomItemBuilder addItem(BottomTabBean bottomTabBean, BottomItemFragment bottomItemFragment) {
        this.items.put(bottomTabBean, bottomItemFragment);
        return this;
    }

    public  final BottomItemBuilder addItems(LinkedHashMap<BottomTabBean, BottomItemFragment> items) {
        this.items.putAll(items);
        return this;
    }

    public final LinkedHashMap<BottomTabBean, BottomItemFragment> getItems() {
        return (LinkedHashMap<BottomTabBean, BottomItemFragment>) this.items;
    }

}
